package com.qf.erpb.product.controller;

import com.qf.erpb.core.common.JsonResult;
import com.qf.erpb.product.param.User2Param;
import com.qf.erpb.product.service.XgUser2Service;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
//@CrossOrigin("*")
@RequestMapping("/info")
public class XgUser2Controller {
    @Resource
    private XgUser2Service xgUserService;
    @RequestMapping ("/login")
    public JsonResult smm(@RequestBody User2Param param) {

//        param.setUsername("王二狗");
//        param.setPassword("321");
//        String replace = UUID.randomUUID().toString().replace("", "");
        String login = xgUserService.login(param);
        return JsonResult.ok(login);
    }

}
